/**
 * 列表项
 * label：列表项名称
 * prop：列表项对应数据key
 * input：列表项搜索类型（input、select、dateTime）
 */
export const baseColumns = [
  {
    label: "common.user",
    prop: "username",
    input: "input",
  },
  {
    label: 'app.fullname',
    prop: "fullname",
    input: "input",
  },
  {
    label: 'app.email',
    prop: "email",
    input: "input",
  },
  {
    label: 'config.language',
    prop: "userLanguage",
    input: "select",
    options: [
      { code: "en", description: "英文" },
      { code: "zh", description: "中文" },
    ],
  },
  {
    label: "common.status",
    prop: "status",
    input: "select",
    options: [
      { code: "1", description: "code.usable" },
      { code: "-1", description: "code.unusable" },
    ],
  },
];

/**
 * 列表搜索表单配置
 * label：列表项名称
 * prop：列表项对应数据key
 * input：列表项搜索类型（input、select、dateTime）
 */
export const baseForm = [];


/**
 * 详情列表项
 * label：详情列表项名称
 * prop：详情列表项对应数据key
 * input：详情列表项搜索类型（input、select、dateTime）
 */
export const infoColumns = [
  {
    label: 'app.userName',
    prop: "name",
    input: "input",
  },
  {
    label: 'app.userDesc',
    prop: "description",
    input: "input",
  }
];

/**
 * 详情搜索表单配置
 * schemas：详情搜索项
 * rules：搜索项规则
 */
export const infoFormConfig = {
    schemas:[
        {
            type: "input",
            label: 'common.user',
            props: "username",
            // disabled: this.addflag
        },
        {
            type: "input",
            label: 'common.pwd',
            inputType: "password",
            props: "password",
        },
        {
            type: "input",
            label: 'app.confirmPassword',
            inputType: "password",
            props: "confirmPassword",
        },
        {
            type: "input",
            label: 'app.fullname',
            props: "fullname",
        },
        {
            type: "input",
            label: 'app.email',
            props: "email",
        }
    ],
    rules:{
        username: [
            {required: true, trigger: 'blur'},
        ],
        password: [
            {required: true, trigger: 'blur'},
        ],
        confirmPassword: [
            {required: true, trigger: 'blur'},
        ],
        fullname: [
            {required: true, trigger: 'blur'},
        ]
    }
}
